using DiLu.Expansion.File.Operates.LocalDisk.Configs;

namespace DiLu.Expansion.File.Operates.LocalDisk;

/// <summary>
///     删除本地磁盘文件
/// </summary>
public static class DeleteLocalDiskFile
{
    /// <summary>
    ///     删除本地磁盘文件
    /// </summary>
    /// <param name="config">删除本地磁盘文件配置</param>
    public static async ValueTask DeleteAsync(this DeleteLocalDiskFileConfig config)
    {
        if (!System.IO.File.Exists(config.FileFullPath)) return;
        await Task.Delay(0);
        System.IO.File.Delete(config.FileFullPath);
    }
}